

angular
    .module("componentsModule", [
        "ui.bootstrap"
    ])
    .component("sanSearch", {
        bindings: {
            searchFunc: "&"
        },
        controller: "sanSearchCtrl",
        controllerAs: "ssc",
        templateUrl: "../html/cmptSanSearch/cmptSanSearch.html"
    })
    .controller("sanSearchCtrl", function() {
        var
            _vm_ = this;

        _vm_.$onInit = $onInit;

        _vm_.search = search;

        function $onInit() {
            _vm_.searchVal = "";
        }

        function search() {
            _vm_.searchFunc({
                val: _vm_.searchVal
            });
        }
    })
    .component("typeList", {
        bindings: {
            title: "@",
            typeList: "<"
        },
        controller: ""
    })
    .component("sanList", {
        bindings: {
            listInfo: "<"
        },
        controller: "sanListCtrl",
        controllerAs: "slc",
        templateUrl: "../html/cmptSanList/cmptSanList.html"
    })
    .controller("sanListCtrl",[ 
        function(){
            
        }]
    )
    .component("sanLogin", {
        bindings: {
            loginFunc: "&",
            labelList: "@"
        }, 
        controller: "sanLoginCtrl",
        controllerAs:  "login",
        templateUrl: "../html/cmptSanLogin/cmptSanLogin.html"
    });